package com.zhijiaoyun.service;

import java.util.List;
import java.util.Map;

import com.zhijiaoyun.model.NewsRecommend;
import com.zhijiaoyun.model.dto.NewsRecommendDto;
import com.zhijiaoyun.model.dto.PageList;

import javax.servlet.http.HttpServletRequest;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface INewsRecommendService {

	NewsRecommend getNewsRecommendByNewsId(Long newsId);

	void addNewsRecommend(NewsRecommend newsRecommend);

	void deleteNewsRecommend(NewsRecommend newsRecommend);

	List<NewsRecommendDto> getNewsRecommentDtoByParams();

	List<NewsRecommendDto> getNewsRecommentByParamsDto(int pageIndex, int pageSize);

	PageList<NewsRecommendDto> pageNewsRecommentDtoByParams(int pageIndex, int pageSize);

	/**
	 * 通过newsId 删除推荐
	 * @param newsId
	 */
	void deleteByNewsId(long newsId);

	/**
	 * 修改推荐news
	 * @param newsId
	 * @param request
	 * @return
	 */
	Map<String,Object> updateRecommend(long newsId, HttpServletRequest request);

	/**
	 * page recommend
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	Map<String,Object> page(int pageIndex, int pageSize);
}
